<template>
  <div>
    <div class="topBox">
      <div :class="nowStep>=1?'tabBox numBoxActive':'tabBox'">
        <span class="numBox">1</span>
        <span class="numText">明确意向</span>
      </div>
      <img class="dianImg" src="@/assets/images/dian.png">
      <div :class="nowStep>=2?'tabBox numBoxActive':'tabBox'">
        <span class="numBox">2</span>
        <span class="numText">初选</span>
      </div>
      <img class="dianImg" src="@/assets/images/dian.png">
      <div :class="nowStep>=3?'tabBox numBoxActive':'tabBox'">
        <span class="numBox">3</span>
        <span class="numText">精选</span>
      </div>
      <img class="dianImg" src="@/assets/images/dian.png">
      <div :class="nowStep>=4?'tabBox numBoxActive':'tabBox'">
        <span class="numBox">4</span>
        <span class="numText">到店体验</span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "fourSteps",
  props: {
    step: {
      type: Number,
      default: 4
    }
  },
  data() {
    return {
      nowStep: 1
    };
  },
  methods: {},
  mounted() {
    this.changeStep = para1 => {
      this.nowStep = para1;
    };
  }
};
</script>

<style lang="stylus" scoped>
.topBox {
  display: flex;
  align-items: flex-start;
  justify-content: center;

  .tabBox {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;

    .numText {
      line-height: 26px;
      font-size: 30px;
    }

    .numBox {
      display: block;
      width: 60px;
      height: 60px;
      border-radius: 50%;
      line-height: 60px;
      text-align: center;
      font-size: 30px;
      margin-bottom: 20px;
    }
  }

  .dianImg {
    width: 50px;
    height: 5px;
    margin: 30px 13px 0;
  }

  .numBoxActive {
    color: #ffffff;
    font-size: 26px;

    .numBox {
      background: #a90017;
      color: #ffffff;
    }
  }
}
</style>